

<div class="row">
  <div class="span3 bs-docs-sidebar ">
 	<*include file="<*$controller*>/location.tpl"*>
  </div>
  <div class="span9">
  <form   action="/<*$controller*>/op" method="POST" class="form-horizontal" onsubmit="return checkOnsubmit();">
      <div class="control-group">
        <label class="control-label" >手机号码：</label>
        <div class="controls">
          <textarea name="tele" id="tele" rows="6" class="span4" placeholder="输入手机号码" onkeyup="return noNumbers(this)" ondragenter="return false"></textarea>
          <span style="font-size: 12px">(多个号码以<font color="#FF0000">英文半角逗号</font>分隔)</span>
        </div>
      </div>
       
      <div class="control-group">
        <label class="control-label" >信息内容 ：</label>
        <div class="controls">
          <textarea name="content" id="content" rows="10" class="span4" placeholder="内容" >尊敬的家长，伊顿集团为您量身定制了一款教育软件，云中校车，并逐校发布。请点击http://t.cn/z8KKe1L 下载安装，账户为您的手机号码，密码为111111，邀您共同体验。增进家校沟通，共同关爱我们的孩子。若有疑问下午家长会解答。【伊顿国际教育集团】</textarea>
          <span style="font-size:12px;">已写[<span id="msglens" >129</span>]<span style="color:#FF0000">1条短信70字</span></span>
        </div>
        <!-- Dear Etonparents, please touch the link of http://t.cn/z8KKe1L to download and install the App of “Cloud School Bus”. Once installed, please use your mobile number as the login account, the initial password is ‘111111’, then enjoy! -->
      </div>
        <input  type="hidden" name="type" value="<*$type*>"  />
      <div  class="control-group form-actions">
        <button class="btn  btn-success" type="submit">发送</button> 
      </div>
    </form> 
    </div>
</div>

<script type="text/javascript">

function noNumbers(obj)   
{   
 	obj.value = obj.value.replace(/[^(\d|\,)]/g,"");//只允许输入数字和,号
 	//var patrn='/,/';
 	//if(!patrn.exec(noNumbers)){
 	 	//alert(obj.value);
 	//	obj.value = obj.value.replace(/[^\d.]/g,"");
 	//}
 	
 //obj.value = obj.value.replace("，",",").replace(/\，/g,",").replace("，",",");

} 


function checkOnsubmit()
{
	
	var tel=$("#tele").val();
	var i=ZQCheckUserName(tel);
	alert(i);
	if(!i){

	}
	if(tel==''||tel==null){
		alert('请输入手机号码');
		return false;
	}
  	return true;
}

$('#content').bind('keyup',function(){
	var len = strlen($(this).val());
	$('#msglens').text(len);
});

function isChinese(str)
{
   var lst = /[u00-uFF]/;       
   return !lst.test(str);      
};
function strlen(str) 
{
	var strlength = 0;
	for (var i=0; i < str.length; ++i)
	{
		if (isChinese(str.charAt(i)) == true)
			strlength = strlength + 1;
		else
			strlength = strlength + 1;
	}
	return strlength;
};
</script>